//
//  WBDemoViewController.swift
//  传智微博
//
//  Created by Pro on 2017/8/3.
//  Copyright © 2017年 liuyanwei. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        title = "第 \(navigationController?.childViewControllers.count ?? 0) 个"
    }

    //下一个
    @objc fileprivate func showNext() {
        print(#function)
        let vc = WBDemoViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
    
}


//设置界面
extension WBDemoViewController {
    //重写父类方法
    override  func setupTableView () {
       super.setupTableView()
//        navigationItem.rightBarButtonItem = UIBarButtonItem.init(title: "下一个", style:.plain, target: self, action: #selector(showNext))

        navItem.rightBarButtonItem = UIBarButtonItem.init(title: "下一个", target: self, action: #selector(showNext))
    }
}
